/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pie4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pie4cloud.pie.bus.api.feign;

import com.pie4cloud.pie.bus.api.entity.DataKafConsumer;
import com.pie4cloud.pie.common.core.constant.SecurityConstants;
import com.pie4cloud.pie.common.core.constant.ServiceNameConstants;
import com.pie4cloud.pie.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * kafka消费者管理
 *
 * @author pie code generator
 * @date 2021-12-28 10:59:58
 */
@FeignClient(contextId = "remoteDataKafConsumerService", value = ServiceNameConstants.BUS_SERVICE)
public interface RemoteKafkaManageService {

	@GetMapping("/api/datakafconsumer/{consId}")
	public R<DataKafConsumer> getById(@PathVariable(value = "consId" ) Long consId, @RequestHeader(SecurityConstants.FROM) String from);

	@PostMapping("/api/datakafconsumer")
	public R<DataKafConsumer> save(@RequestBody DataKafConsumer dataKafConsumer, @RequestHeader(SecurityConstants.FROM) String from);

	@PutMapping("/api/datakafconsumer")
	public R<DataKafConsumer> updateById(@RequestBody DataKafConsumer dataKafConsumer, @RequestHeader(SecurityConstants.FROM) String from);

	@DeleteMapping("/api/datakafconsumer/{consId}" )
	public R removeById(@PathVariable(value = "consId" )  Long consId, @RequestHeader(SecurityConstants.FROM) String from);

}
